package com.itHsuSE.demo5;

/**
 * @author Hsu琛君珩
 * @version 1.0
 */
public class Test5 {
    public static void main(String[] args) {
        Car car=new Car(60);
        car.getAir().flow();
    }
}

class Car{
    private double temperature;

    public Car(double temperature) {
        this.temperature = temperature;
    }

    class Air{
        public void flow(){
            if(temperature>40){
                System.out.println("吹冷气");
            }else {
                System.out.println("吹热气");
            }
        }
    }

    Air air=new Air();
    public Air getAir(){
        return air;
    }
}
